{include file="common/header"}
<div class="content-wrapper">
    {include file="chat/nav"/}
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="nav-tabs-custom">
                    {include file="chat/tabs"/}
                    <a href="https://www.niurenzhuan.xyz/home/task/detail/id/{$complaint.task_id}.html" target="_blank"><h1>任务链接</h1></a>
                    <div id="layer-photos-demo" class="layer-photos-demo">
                    	
                    {if $detail !=''}
                    	<p>雇主要求：</p>
                    	<p>{$detail.detail}</p>
                    {/if}
                    {if $guzhuimgs !=''}
                    <div>
                    	<p>雇主要求截图</p>
                    	{volist name="guzhuimgs" id="v"}
                    		<img src="{$v['image']}" layer-src="{$v['image']}" style="width:200px;height:200px"/><br/><hr />
                    	{/volist}
                    </div>
                    {/if}
                    {if $task_join.check_text_content !='' || $task_join.check_text_content2 !=''}
                    	<p>赚客提交：</p>
                    	{if $task_join.check_text_content !=''}
                    		<p>{$task_join.check_text_content}</p>
                    	{/if}
                    	{if $task_join.check_text_content2 !=''}
                    		<p>{$task_join.check_text_content2}</p>
                    	{/if}
                    {/if}
                    {if $zhuankeimgs !=''}
                    <div>
                    	<p>赚客提交</p>
                    	{volist name="zhuankeimgs" id="v"}
                    		<img src="{$v}" layer-src="{$v}" style="width:200px;height:200px"/><br/><hr />
                    	{/volist}
                    </div>
                    {/if}
                    <div class="tab-content">
        				{volist name="list" id="v"}
                                        	{if $v['is_admin'] ==0}
	                                        	{if $v['uid'] == $complaint['uid']}
	                                        		{if $v['content'] != ''}
	                                        			<b style="color:#4155F3">投诉者-{$complaint.tname}--{$complaint.uid}--{$v['create_time']}：</b><p>{$v['content']}</p><br/><hr />
	                                        		{/if}
	                                        		{if $v['img'] != ''}
	                                        			<p style="color:#4155F3">投诉者-{$complaint.tname}--{$complaint.uid}--{$v['create_time']}：</p>
	                                        			<img src="{$v['img']}" layer-src="{$v['img']}" style="width:200px;height:200px"/><br/><hr />
	                                        		{/if}
	                                        	{else /}
	                                        		{if $v['content'] != ''}
	                                        			<b style="color:#FD6A53">被投诉者--{$complaint.btname}--{$complaint.fid}--{$v['create_time']}：</b><p>{$v['content']}</p><br/><hr />
	                                        		{/if}
	                                        		{if $v['img'] != ''}
	                                        			<p style="color:#FD6A53">被投诉者--{$complaint.btname}--{$complaint.fid}--{$v['create_time']}：</p>
	                                        			<img src="{$v['img']}" layer-src="{$v['img']}" style="width:200px;height:200px"/><br/><hr />
	                                        		{/if}
	                                        	{/if}
	                                        {else /}
	                                        	管理员：<p>{$v['content']}</p><hr />
	                                        {/if}
                                        {/volist}
						
<input type="hidden" id="id" value="{$complaint['id']}"/>
                        		

                            <div class="panel panel-info">
                                <div class="panel-heading">
                                    反馈回复
                                </div>
                                <div class="panel-body">

                                    <div class="form-group">
                                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">内容</label>
                                        <div class="col-sm-6 col-xs-12">
                                            <textarea class="form-control" id="content"  maxlength="1000" rows="5" placeholder="请输入反馈回复"></textarea>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-sm-6 col-xs-12 col-sm-offset-2">
                                          
                                            <button type="button" id="huifu" class="btn btn-primary">回复</button>
                                        </div>
                                        <br/><br/><br/>
                                        <div class="col-sm-6 col-xs-12 col-sm-offset-2">
                                          
                                            <button type="button" id="tongguo" class="btn btn-primary">通过</button>
                                        </div>
                                        <br/><br/><br/>
                                        <div class="col-sm-6 col-xs-12 col-sm-offset-2">
                                          
                                            <button type="button" id="butongguo" class="btn btn-primary">不通过</button>
                                        </div>
                                       
                                    </div>

                            </div>


                        <link rel="stylesheet" href="/static/plugins/dialog/css/dialog.css" />
                        <script src="/static/plugins/dialog/js/dialog.js"></script>
                        <style type="text/css">
                            .dialog {
                              position: fixed;
                              left: 0;
                              top: 0;
                              z-index: 10001;
                              width: 100%;
                              height: 100%;
                            }
                            .dialog-content {
                                width: 230px;
                            }
                            .dialog-overlay {
                              position: absolute;
                              top: 0;
                              left: 0;
                              z-index: 10002;
                              width: 100%;
                              height: 100%;
                              background-color: rgba(0, 0, 0, 0.5);
                            }
                        </style>
                        <script src="/static/home/mobile/js/layer.js"></script>
                        <script type="text/javascript">

                          $('#huifu').click(function(){
                            		var content = $('#content').val();
                            		if(content == ''){
                            			message('回复不能为空','','error');
                            		}
                            		$.ajax({
							          url: window.location.href,
							          type: 'post',
							          data:{
							          	id:$('#id').val(),
							          	content:content
							          },
							          dataType: 'json',
			
							          success: function(res) {
							          	message(res.message, res.redirect, res.type);
							          }
                            		})                		
							      })
							      $('#tongguo').click(function(){
     
                            		$.ajax({
							          url: '/admin/chat/compass',
							          type: 'post',
							          data:{
							          	id:$('#id').val(),
							          },
							          dataType: 'json',
							          success: function(res) {
							          	message(res.message, res.redirect, res.type);
							          }
                            		})                		
							      })
							      $('#butongguo').click(function(){
                            		$.ajax({
							          url: '/admin/chat/comnopass',
							          type: 'post',
							          data:{
							          	id:$('#id').val()
							          },
							          dataType: 'json',
							          success: function(res) {
							          	message(res.message, res.redirect, res.type);
							          }
                            		})                		
							      })
							      layer.photos({
									  photos: '#layer-photos-demo'
									  ,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
									});

                        </script>
                    </div>
                   </div>
                    <!-- /.tab-content -->
                </div>
                <!-- /.nav-tabs-custom -->
            </div>
            <!-- /.col -->
        </div>
    </section>
</div>
{include file='common/ufooter'}
